package com.sdjzu.wangfuying.hellospringboot.controller;

import com.sdjzu.wangfuying.hellospringboot.util.SpringBootUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@Controller
@RequestMapping(value = "/error")
public class ErrorController implements org.springframework.boot.web.servlet.error.ErrorController {
    @Override
    public String getErrorPath() {
        return "error/error";
    }

    @RequestMapping
    public String error() {
        HttpServletRequest request = SpringBootUtil.getRequest();
        Map<String, String[]> map = request.getParameterMap();
        return getErrorPath();
    }
}
